public class PasswordGenerator {
	private static final int low = 32, high = 126;
	private static String[] t = {"abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "0123456789", " !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"};
	public static void main(String[] args) {
		int num = Integer.parseInt(args[0]);
		
		// sets based
		for(int i = 0; i < num; i++) {
			int ind = (int)(Math.random() * t.length);
			int ind2 = (int)(Math.random() * t[ind].length());
			System.out.print(t[ind].charAt(ind2));
		}
		System.out.println();
		
		// range based
		int range = high - low;
		for(int i = 0; i < num; i++) {
			int ascii = (int)(Math.random() * range) + low;
			System.out.print((char)ascii);
		}
		System.out.println();
	}
}
